import os, sys
sys.path.append(os.path.abspath("."))
import bootstrap
import stocky.interface

script_sym = "LT.NS"

s = stocky.interface.Stock.get(script_sym)
s = stocky.interface.addStock(symbol=script_sym, name="My Script", sector='new')
print s.name, s.symbol, s.sector

print s.prices
stocky.interface.updatePrice(script_sym)
print s.prices

print stocky.interface.listStocks()
print stocky.interface.listStocksDetails()

stocky.interface.buyStock(script_sym, 1000, 100) # 100
tr = stocky.interface.sellStock(script_sym, 970, 99) # 1
print tr.profit
stocky.interface.buyStock(script_sym, 100, 10) # 11
tr = stocky.interface.sellStock(script_sym, 98, 3) # 1
print tr.profit

tr = stocky.interface.sellStock(script_sym, 99, 1) # 0
print tr.profit

print s.highest_price, s.current_price, s.suggestion

wish = stocky.interface.addToWishList(script_sym, 1900)
print wish.suggestion

#stocky.interface.removeStock(script_sym)
#print stocky.interface.listStocks()
